<template>
  <div class="page">
    <div class="contentWrapper">
      <h1 class="pageTitle">直律师报告</h1>
        <div class="resultWrapper" v-for="(val, key, index) in result">
            <vue-simple-markdown class="resultWrapper" :postrender="postRender" :source="val"></vue-simple-markdown>
        </div>
        <div class="btnReturn" @click="redirect('Home')">咨询其他问题</div>
    </div>
  </div>
</template>
<script>
var vm;
export default {
    data() {
        return {
            result: ''
        }
    },
    created: function(){
        vm = this;
        vm.result = vm.$route.params.result;
        console.log(vm.result)
    },
    mounted() {
        scrollTo(0,0);
    },
    methods: {
        postRender(html) {
            return he.decode(html);
        },
        redirect: function (pageName) {
            vm.$router.push({ name: pageName });
        }
    }
}
</script>
<style lang="scss">
@media screen and (min-width: 920px) {
    .resultWrapper {
        text-align: left;
        padding: 0 14px;
        p {
            text-align: left;
            font-size: 16px;
            color: #000;
        }
        h1 {
            font-size: 18px;
            color: #8E8E93;
            background: url('../imgs/title-sign.png')no-repeat;
            background-size: contain;
            text-align: left;
            padding-left: 26px;
            margin-top: 28px;
            font-weight: 400;
        }
    }
}
@media screen and (max-width: 919px) {
    .resultWrapper {
        padding: 0 .14rem;
        p {
            text-align: left;
            font-size: .16rem;
            color: #000;
        }
        h1 {
            font-size: .16rem;
            color: #8E8E93;
            background: url('../imgs/title-sign.png')no-repeat;
            background-size: contain;
            text-align: left;
            padding-left: .26rem;
            margin-top: .28rem;
            font-weight: 400;
        }
    }
}
</style>

<style lang="scss" scoped>
@media screen and (min-width: 920px) {
    .contentWrapper {
        max-width: 920px;
        margin: 0 auto;
    }
    #topLine {
        width: 100%;
        height: 4px;
        background-image: url(../imgs/topline.png);
        background-size: cover;
        box-shadow: 1px 1px 4px rgba(0,0,0,.08);
    }
    .clearFix {
    clear: both;
    }
    .pageTitle {
        font-weight: 400;
        color: #aaa;
        text-shadow: 1px 1px 4px rgba(0,0,0,.08);
        box-shadow: 1px 1px 4px rgba(0,0,0,.08);
        font-size: 24px;
        line-height: 48px;
    }
    .btnReturn {
        cursor: pointer;
        display: block;
        font-size: 22px;
        width: 144px;
        text-align: center;
        padding: 4px;
        margin: 96px auto;
        height: 54px;
        line-height: 54px;
        border: 1px solid #ddd;
        color: #999;
        border-radius: 4px;
        border: 1px solid #777;
        color: #333;
    }
}
@media screen and (max-width: 919px) {
    #topLine {
        width: 100%;
        height: .04rem;
        background-image: url(../imgs/topline.png);
        background-size: cover;
        box-shadow: 1px 1px .02rem rgba(0,0,0,.08);
    }
    .clearFix {
    clear: both;
    }
    .pageTitle {
        font-weight: 400;
        color: #aaa;
        text-shadow: 1px 1px .02rem rgba(0,0,0,.08);
        box-shadow: 1px 1px .02rem rgba(0,0,0,.08);
        font-size: .18rem;
        line-height: .4rem;
    }
    .btnReturn {
        display: block;
        font-size: .21rem;
        width: 1.44rem;
        text-align: center;
        padding: .04rem;
        margin: .96rem auto;
        height: .54rem;
        line-height: .54rem;
        border: 1px solid #ddd;
        color: #999;
        border-radius: .04rem;
        border: 1px solid #777;
        color: #333;
    }
}
</style>
